<?php 
session_start(); 
require_once('include/connect.inc.php'); 
if($_SESSION['sess_id'] <> session_id()){
?>
 <SCRIPT LANGUAGE="JavaScript">
			alert("กรุณาเข้าสู่ระบบให้ถูกต้องตามขั้นตอน...!");
			location="login.php";
</script>
<?php }?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Model Test Program</title>
<link rel="stylesheet" type="text/css" href="template/template_style_wood.css">
</head>
<body>
<div id="menu"><div><img src="../images/icon-m.png" /></div>
<div id="menulinks">
		<a  href="person_stu.php">ข้อมูลส่วนตัว</a>
		<a href="stu_edit.php">เปลี่ยนรหัสผ่านใหม่</a>
        <a href="frm_showset_dotest.php">รายการสอบ</a>
        <a class="active"  href="show_dotest_result.php">ผลการสอบ</a>
        <a  href="problem/student_send_problem.php">แสดงความคิดเห็น</a>
        <a  href="problem/student_message.php">กล่องข้อความ</a>
        <a href="logout.php">ออกจากระบบ</a>
</div></div>
    
 <div id="p3">    
<div id="header"></div>
<div id="page"><div id="p1">คุณ<?php echo $_SESSION['student_name'];?> <hr />
<form>
<table border="0"  id="table"  summary="2007 Major IT Companies Profit">
  <tr>
    <th align="center">ลำดับที่</th>
    <th align="center">ชุดที่</th>
    <th align="center">วิชา</th>
    <th align="center">หัวข้อสอบ</th>
    <th align="center">วันที่ทำข้อสอบ</th>
   <th align="center">ตรวจสอบคะแนน</th>
  </tr>
  <?php
   $number=0;
  	$query = query("SELECT * FROM tb_dotest  
	  Inner Join  tb_set_of_test ON  tb_set_of_test.set_id = tb_dotest.set_id 
	  Inner Join  tb_subject ON  tb_subject.subject_id = tb_set_of_test.subject_id 
		Inner Join  tb_topic ON  tb_topic.topic_id = tb_set_of_test.topic_id where r_student_id='".$_SESSION['id']."' ORDER BY  tb_set_of_test.set_id DESC");
		while ($rs = fetch_array($query)) {
				$dotest_id= $rs['dotest_id'];
				$date_test= $rs['date_test'];
				$set_id = $rs['set_id'];
				$set_date_cre = $rs['set_date_cre'];
				$start_dates = $rs['start_dates'];
				$end_dates = $rs['end_dates'];
				$end_dates = $rs['end_dates'];
				$set_time_dotest = $rs['set_time_dotest'];
				$topic_detail = $rs ['topic_detail'];
				$subject_name = $rs ['subject_name'];
				$number++;
  ?>
  <tr>
    <td align="center"><? echo $number; echo "."; ?></td>
    <td><? echo "$set_id";?></td>
    <td><? echo "$subject_name";?></td>
    <td><? echo "$topic_detail";?></td>
    <td><? echo $date_test;?></td>
    <td align="center"><a href="exam/score.php?dotest_id=<? echo $dotest_id?>"><img src="images/s.png" alt="" border="0" /></a></td>
  </tr>
  <?php }?>
</table>
</form>
    </div>
    </div>
<div id="footer"></div>
</div>
</body>
</html>
